<?php

namespace App\Admin\Resources;
use App\Admin\Models\SystemModel;

/**
 * @mixin \App\Admin\Models\SystemModel
 */
class SystemModelResource extends JsonResource
{
    public const FOR_EDIT = 'edit';

    public function toArray($request)
    {
        $data = [
            'parent' => SystemModel::find($this->parent_id,['name','slug']),
        ];
        return array_merge(parent::toArray($request),$data);
    }
}
